package com.example.springbootelk.controller;

import com.example.springbootelk.annotation.Log;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/elk")
public class TestController {

    @Log("新增")
    @PostMapping(value = "/add.do")
    public String add(@RequestBody String id) {
        return "新增成功";
    }

    @Log("删除")
    @PostMapping(value = "/delete.do")
    public String delete() {
        return "删除成功";
    }
}
